
import {catelist} from '../../../request/api'
const state ={
    cateList:[]
}

const getters={
    getSort(state){
        return state.cateList
    }
}

const mutations={
    CHANGECATE(state,payload){
        state.cateList = payload
    }
}

const actions ={
    GetSortInfo({commit}){
        catelist({
            istree:1
        })
        .then(res=>{
            if(res.code=200){
                console.log(res);
                commit('CHANGECATE',res.list)
            }
        })
    }
}

export default {
    state,
    getters,
    mutations,
    actions,
    namespaced:true
}